/*
 * @Author: gyc
 * @Date: 2020-07-01 16:08:33
 * @LastEditTime: 2020-07-02 09:40:58
 * @Description: Nuxt测试版
 */
'use strict';

const Controller = require('egg').Controller;


class MusicController extends Controller {
    async getMusic() {
        const {
            ctx
        } = this
        const id=ctx.query.id
        const musicMain = await ctx.service.music.findOne(id)
        ctx.body = {
            data: musicMain
        }
    }
    async getAllMusic() {
        const {
            ctx
        } = this
        const musicMain = await ctx.service.music.findALL()
        ctx.body = {
            data: musicMain
        }
    }
}

module.exports = MusicController